home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / oper_sys / kerberos / pc / krb_src.lha / INCLUDE / KRB_DB.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-05-30  |  2.5 KB  |  105 lines

  1. /*
  2.  * $Source: /mit/kerberos/src/include/RCS/krb_db.h,v $
  3.  * $Author: jon $
  4.  * $Header: krb_db.h,v 4.9 89/01/24 17:55:39 jon Exp $ 
  5.  *
  6.  * Copyright 1987, 1988 by the Massachusetts Institute of Technology. 
  7.  *
  8.  * For copying and distribution information, please see the file
  9.  * <mit-copyright.h>. 
  10.  *
  11.  * spm        Project Athena  8/85 
  12.  *
  13.  * This file defines data structures for the kerberos
  14.  * authentication/authorization database. 
  15.  *
  16.  * They MUST correspond to those defined in *.rel 
  17.  */
  18.  
  19. #include <mit-copyright.h>
  20.  
  21. #ifndef KRB_DB_DEFS
  22. #define KRB_DB_DEFS
  23.  
  24. #define KERB_M_NAME        "K"    /* Kerberos */
  25. #define KERB_M_INST        "M"    /* Master */
  26. #define KERB_DEFAULT_NAME    "default"
  27. #define KERB_DEFAULT_INST    ""
  28. #define    DBM_FILE        "/kerberos/principal"
  29.  
  30. /* this also defines the number of queue headers */
  31. #define KERB_DB_HASH_MODULO 64
  32.  
  33.  
  34. /* Arguments to kerb_dbl_lock() */
  35.  
  36. #define KERB_DBL_EXCLUSIVE 1
  37. #define KERB_DBL_SHARED 0
  38.  
  39. /* arguments to kerb_db_set_lockmode() */
  40.  
  41. #define KERB_DBL_BLOCKING 0
  42. #define KERB_DBL_NONBLOCKING 1
  43.  
  44. /* Principal defines the structure of a principal's name */
  45.  
  46. typedef struct {
  47.     char    name[ANAME_SZ];
  48.     char    instance[INST_SZ];
  49.  
  50.     unsigned long key_low;
  51.     unsigned long key_high;
  52.     unsigned long exp_date;
  53.     char    exp_date_txt[DATE_SZ];
  54.     unsigned long mod_date;
  55.     char    mod_date_txt[DATE_SZ];
  56.     unsigned short attributes;
  57.     unsigned char max_life;
  58.     unsigned char kdc_key_ver;
  59.     unsigned char key_version;
  60.  
  61.     char    mod_name[ANAME_SZ];
  62.     char    mod_instance[INST_SZ];
  63.     char   *old;        /* cast to (Principal *); not in db,
  64.                  * ptr to old vals */
  65. }
  66.         Principal;
  67.  
  68. typedef struct {
  69.     long    cpu;
  70.     long    elapsed;
  71.     long    dio;
  72.     long    pfault;
  73.     long    t_stamp;
  74.     long    n_retrieve;
  75.     long    n_replace;
  76.     long    n_append;
  77.     long    n_get_stat;
  78.     long    n_put_stat;
  79. }
  80.         DB_stat;
  81.  
  82. /* Dba defines the structure of a database administrator */
  83.  
  84. typedef struct {
  85.     char    name[ANAME_SZ];
  86.     char    instance[INST_SZ];
  87.     unsigned short attributes;
  88.     unsigned long exp_date;
  89.     char    exp_date_txt[DATE_SZ];
  90.     char   *old;    /*
  91.              * cast to (Dba *); not in db, ptr to
  92.              * old vals
  93.              */
  94. }
  95.         Dba;
  96.  
  97. extern int kerb_get_principal();
  98. extern int kerb_put_principal();
  99. extern int kerb_db_get_stat();
  100. extern int kerb_db_put_stat();
  101. extern int kerb_get_dba();
  102. extern int kerb_db_get_dba();
  103.  
  104. #endif /* KRB_DB_DEFS */
  105.